package Super关键字;

public class Student extends Person{
    String major;
    int id=1002;//学生学号
    public Student(){
    }
    public Student(String major){
        this.major=major;
    }
    public Student(String name,int age,String major){
        super(name,age);
        this.major=major;
//        this.name=name;
//        this.age=age;
    }

    @Override
    public void eat() {
        System.out.println("学生吃东西");
    }
    public void study(){
        System.out.println("学生学习东西");
        super.eat();
        eat();
    }
    public void show(){
        System.out.println("name ="+name+", age ="+age);
        System.out.println(id+" "+super.id);
    }
}
